using System;

namespace GURUCORE.Framework.Core.Data
{
	[AttributeUsage(AttributeTargets.Property)]
	public class PersistencePropertyAttribute : Attribute
	{
        #region PUBLIC PROPERTIES
        
		private string m_sFieldName;
		private bool m_bIdentity;
		private bool m_bReadOnly;		

		public string FieldName
		{
			get
			{
				return m_sFieldName;
			}
			set
			{
				m_sFieldName = value;
			}
		}

		public bool Identity
		{
			get
			{
				return m_bIdentity;
			}
			set
			{
				m_bIdentity = value;
			}
		}

		public bool ReadOnly
		{
			get
			{
				return m_bReadOnly;
			}
			set
			{
				m_bReadOnly = value;
			}
        }

        #endregion


        #region CONSTRUCTOR

        public PersistencePropertyAttribute(string p_sFieldName, bool p_bIdentity, bool p_bReadOnly)
        {
            m_sFieldName = p_sFieldName;
            m_bIdentity = p_bIdentity;
            m_bReadOnly = p_bReadOnly;
        }

        #endregion

    }
}
